package business;

import java.util.ArrayList;
import java.util.List;

import dao.ProductDAO;
import android.content.Context;
import android.database.Cursor;
import beans.Product;

public class ProductBusiness {
	
	public Product returnProduct(String productName, Context context){
		Product product = new Product();
		ProductDAO productDao = new ProductDAO(context);
		
		product = productDao.returnProduct(productName);
		
		return product;
	}
	
	public void insertProduct(Product product, Context context){

		ProductDAO productDao = new ProductDAO(context);
		productDao.insertProduct(product);


	}
	
	public List<Product> returnListProducts(Context context){

		
		ProductDAO productDao = new ProductDAO(context);
		

		
		return productDao.returnListProducts();
	}

}
